package com.hc.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.hc.entity.Payment;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface PaymentMapper extends BaseMapper<Payment> {

    @Insert("insert into tb_payment values (#{payment.id} ,#{payment.serial})")
    int insertPayment(@Param("payment") Payment payment);

    @Select("select * from tb_payment where id = #{id}")
    Payment selectPaymentById(@Param("id") Integer id);
}
